package com.da.javatest.niuke.baodian;

/**
 * @author chenlida
 * @date 2020/10/7 15:12
 * https://www.nowcoder.com/practice/30c1674ad5694b3f8f0bc2de6f005490?tpId=8&tags=&title=&diffculty=0&judgeStatus=0&rp=1
 */
public class C26BinInsert {
    /**
     * 1024，19，2，6  返回：1100
     * 0100 0000 0000:1024
     * 0000 0001 0011:19
     * 0100 0100 1100:1100
     */
    public static int binInsert(int n, int m, int j, int i) {
        return n | (m << j);
    }

    public static void main(String[] args) {
        System.out.println(binInsert(1024, 19, 2, 4));
    }
}
